import datetime
from typing import Union
from pydantic import BaseModel


class FlowSchema(BaseModel):
    name: str
    steps: list


class FlowUpdateSchema(BaseModel):
    flow_id: str
    name: str
    steps: Union[list, None]


class FlowDeleteSchema(BaseModel):
    id_: str


class FlowLogSchema(BaseModel):
    step_id: str
    step_name: str
    create_time: datetime.datetime
    username: str
    status: int
    log: str
